import {ref, computed} from 'vue'
import {defineStore} from 'pinia'

export const searchStore = defineStore('search', () => {
    const search = ref(null)
    const searchInfo = computed(() => search.value)

    function updateSearch(s) {
        search.value = s
    }

    // 重置token
    function $reset() {
        search.value = null
    }

    return {search, searchInfo, updateSearch, $reset}
})
